<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Response.CodePage=65001%>
<%Response.Charset="utf-8"%>
<!--#include file="conn.asp"-->

<%
'if Request.ServerVariables("HTTP_REFERER")="" then
'response.end()
'end if


'积分查询
if request("act")="point" then
num=ucase(request("limit"))
page=ucase(request("page"))



stemp="{""data"":["

sql="select * from [user_point] where uid="&request.Cookies("user")("id")&" order by id desc"

rs.open sql,conn,1,1


if not rs.eof then
if request("page")="" then 
currentPage=1 
else 
currentPage=cint(request("page")) 
end if 
perpage=num
rs.PageSize = perpage 
rs.AbsolutePage=currentpage 
page_count=0
i=(page-1)*num 
totalrec=rs.recordcount
while (not rs.eof) and (not page_count = rs.PageSize) 
i = i + 1 
page_count=page_count+1
if totalrec mod perpage=0 then 
n= totalrec \ perpage 
else 
n= totalrec \ perpage+1 
end if 
if cint(page)=n then
ss=totalrec
else
ss=page*num
end if


if i=ss then
hr=""
else
hr=","
end if
stemp=stemp&"{""id"":"""&rs("id")&""",""point"":"""&rs("point")&""",""bz"":"""&rs("bz")&""",""num"":"""&rs("num")&""",""intime"":"""&rs("intime")&"""}"&hr&""

rs.movenext
wend
end if

stemp=stemp&"],""count"":"""&rs.recordcount&""",""code"":""0"",""msg"":""""}"

response.write stemp
rs.close

end if








%>



